Caret Movement Across Direction Boundaries
Caret Movement Across Direction Boundaries
When a user presses the arrow keys to move the caret left or right across
characters on a line, TextEdit moves the caret uniformly in the direction of
the arrow. This sequence is unambiguous when a user moves the caret in the
middle of a style run. However, on direction boundaries, only the primary caret
moves uniformly in the direction of the arrows.
The next figure shows a sequence of two Right Arrow key presses and their
impact on caret display and movement in a mixed- directional line. If the
original caret position is 13 and the Right Arrow key is pressed, TextEdit
displays a dual caret at primary caret position 12 and secondary caret position
4, with the primary caret moving to the next position in the direction of the
arrow. If the Right Arrow key is pressed again, the new caret position is at
primary caret position 5.
Note: TextEdit currently deviates from this model for caret movement
in unstyled left-to-right text (displayed in a non-Roman font) on any
right-to-left script system. On the Arabic Script System, for example, it is
possible to display Roman characters from an Arabic font. If a user presses
the arrow keys to move through these characters, the caret moves in the
opposite direction of the arrow. Because of keyboard and font
synchronization, this situation is not common.
Caret movement across a direction boundary